package com.cs.study.homework._0228;

public enum Season {
    SPRING(1),
    SUMMER(2),
    AUTUMN(3),
    WINTER(4),

    ;
    int id;

    public int getId() {
        return id;
    }

    Season(int id) {
        this.id = id;
    }

    Season() {
    }

    public static Season findById(int id) {
        for (Season season : Season.values()) {
            if (season.getId() == id) {
                return season;
            }
        }
        return null;
    }
}
